package com.grad.webstudy.service;

import com.grad.webstudy.model.CourseChapter;
import com.grad.webstudy.vo.CourseChapterVo;

import java.util.List;

/**
 * @Description:
 * @Author: zjf
 * @Date: 2020/2/9 9:24.
 */
public interface CourseChapterService {

    /**
     * 插入单个章节
     * @param courseChapter
     * @return
     */
    int addChapter(CourseChapter courseChapter);


    /**
     * 批量插入章节信息
     * @param chapters
     * @return
     */
    boolean addChapters(List<CourseChapter>chapters);


    /**
     * 根据ids批量删除信息
     * @param ids
     * @return
     */
    boolean deleteChapters(String ids);

    /**
     * 根据课程id删除章节信息
     * @param courseId
     * @return
     */
    boolean deleteChaptersByCourseId(Integer courseId);


    /**
     * 更新章节信息
     * @param courseChapter
     * @return
     */
    boolean updateChapter(CourseChapter courseChapter);


    /**
     * 查询某个课程下的章节信息
     * @param courseId
     * @return
     */
    List<CourseChapterVo> queryChaptersByCourseId(Integer courseId);


    /**
     * 根据章节id查询当个章节
     * @param courseChapterId
     * @return
     */
    CourseChapter queryChapterById(Integer courseChapterId);
}
